<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateTableLuckDraw extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('luck_draw', function (Blueprint $table) {
            $table->id();
            $table->string('name',50)->default('')->comment('奖品名称');
            $table->string('url',150)->default('')->comment('奖品图片地址');
            $table->tinyInteger('is_delete')->default(0)->comment('是否删除 1是 0否');
            $table->tinyInteger('status')->default(0)->comment('上架状态 1是 0否');
            $table->integer('activity_id')->unsigned()->default(0)->comment('活动ID');
            $table->timestamps();
        });
        DB::statement('alter table ex_luck_draw comment "奖品表"');
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('luck_draw');
    }
}
